package net.coding.api.test.helper.impl.professional;

import net.coding.api.test.helper.BaseGitHelper;

import static net.coding.api.test.TestHelper.userHelper;

/**
 * Created with IntelliJ IDEA.
 * User: chenfeilong
 * Date: 2018/1/18
 * Time: 12:53
 * Description:
 */
public class ProfessionalGitHelper implements BaseGitHelper {

    @Override
    public String getGitDepotPath(String projectName) {
        return String.format("/u/%s/p/%s/git", userHelper.getGlobalKey(), projectName);
    }

    @Override
    public String getArchiveUri(String projectName, String ref) {
        return String.format("/u/%s/p/%s/git/archive/%s", userHelper.getGlobalKey(), projectName, ref);
    }

    @Override
    public String getRawBlobUri(String projectName, String ref, String path) {
        return String.format("/u/%s/p/%s/git/raw/%s/%s", userHelper.getGlobalKey(), projectName, ref, path);
    }


}
